<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include}::header"></head>
<link href="css/bootstrap.min.css?v=3.3.6" th:href="@{/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet">
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox-content">
				<form class="form-horizontal m-t" id="signupForm" name="signupForm">
					<input id="userId" name="userId" th:value="${user.userId}" type="hidden">
					<div class="form-group">
						<label class="col-sm-3 control-label">姓名：</label>
						<div class="col-sm-8">
							<input id="name" name="name" class="form-control" type="text" th:value="${user.name}">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">用户名：</label>
						<div class="col-sm-8">
							<input id="username" name="username" class="form-control" type="text" th:value="${user.username}" readonly>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">手机号：</label>
						<div class="col-sm-8">
							<input id="mobile" name="mobile" class="form-control" th:value="${user.mobile}" type="text">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">状态:</label>
						<div class="col-sm-8">
							<label class="radio-inline">
								<input th:field="*{user.status}" type="radio" name="status" value="1" />
								正常
							</label>
							<label class="radio-inline">
								<input th:field="*{user.status}" type="radio" name="status" value="0" />
								禁用
							</label>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">角色</label>
						<div class="col-sm-8">
							<select data-placeholder="--请选择--" name="roleId" id="roleId"
									class="form-control chosen-select" onchange="getShopByType()">
								<option value="">请选择角色</option>
								<option th:each="role:${roles}" th:value="${role.roleId}"
										th:selected="${user.roleId == role.roleId}" th:text="${role.roleName}"></option>
							</select>
						</div>
					</div>


					<div id="divShopId" class="form-group" th:classappend="${user.roleId eq 4 } ? '' : 'hidden'">
						<label class="col-sm-3 control-label">所属企业</label>
						<div class="col-sm-8">
							<select id="shopId" name="shopId" lay-search="" class="form-control chosen-select">
								<option value="">所属企业</option>
								<th:block th:each="d : ${shops}">
									<option th:value="${d.id}" th:selected="${d.id == user.shopId}" th:text="${d.shopName}"></option>
								</th:block>
							</select>
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-3">
							<button type="submit" class="btn btn-primary">提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
<div th:include="@{include}::footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/sys/user/edit.js}"></script>
</body>
</html>
